/**
 * Created by Administrator on 2017/3/21.
 */
import React, {Component} from 'react';
import {
  Form, Input, Radio, Select, Icon,
  Upload, Descriptions,
} from 'antd';
import {connect} from 'dva';
import moment from 'moment'
import request from '@/utils/request';
const FormItem = Form.Item;
const { TextArea } = Input;
const RadioGroup = Radio.Group;
const Option = Select.Option;
class AddPoliciesForm extends Component {
  constructor(props) {
    super(props);
    this.state = {
      fileList:[]
    };
  }

  componentDidMount() {
  }
  render() {
    const formItemLayoutWithLabel = {
      labelCol: {
        xs: {span: 24},
        sm: {span: 6},
      },
      wrapperCol: {
        xs: {span: 24},
        sm: {span: 15},
      }
    };

    const {getFieldDecorator} = this.props.form;
    return (
      <div>
        <Form>
          <Descriptions  column={4}   className={'blue-descriptions'} title={<div style={{textAlign:'center'}}>留言详情</div>} bordered>
            <Descriptions.Item label={'主题'} span={4}>
              {
                this.props.editRecord.title
              }
            </Descriptions.Item>
            <Descriptions.Item label={'内容'} span={4}>
              {
                this.props.editRecord.content
              }
            </Descriptions.Item>
            <Descriptions.Item label={<span ><span style={{color:'red',top:'2px',
              position:'relative'}}>* </span> 回复内容</span>} span={4}>
              {getFieldDecorator('reply', {
                initialValue:  this.props.editRecord.reply,
                rules: [{ required: true, message: '请输入回复内容' }],
              })(
                <TextArea  rows={3}  />
              )}
            </Descriptions.Item>
          </Descriptions>
        </Form>
      </div>
    );
  }
}

const AddPoliciesFormWrap = Form.create()(AddPoliciesForm);
export default connect()(AddPoliciesFormWrap);


